home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / coppers.lha / CopperDemo.s < prev    next >
Encoding:
Text File  |  1993-10-29  |  1.6 KB  |  69 lines

  1. copperlist=$78000
  2.  
  3. start:        move.l    $4,a6
  4.         bsr    init
  5. scan:        cmp.b    #$80,$dff006
  6.         bne.s    scan
  7.         btst    #6,$bfe001
  8.         bne.s    scan
  9.         move.l    #$22f8,$dff080
  10.         move.w    #$c000,$dff09a
  11.         clr.l    d0
  12.         rts
  13.  
  14. init:        move.w    #$4000,$dff09a
  15.         bsr    makecopper
  16.         move.l    #copper,$dff080
  17.         move.w    $dff088,d0
  18.         rts
  19.  
  20. makecopper:    lea    copper,a0
  21.         lea    copperlist,a1
  22. mc:        move.l    (a0)+,(a1)+
  23.         cmp.l    #-1,(a0)
  24.         bne.s    mc
  25.         move.l    #$80dffffe,d0
  26.         move.l    #$01800000,d1
  27. mc2:        move.l    d0,(a1)+
  28.         move.l    d1,(a1)+
  29.         add.l    #$00000111,d1
  30.         add.l    #$01000000,d0
  31.         cmp.l    #$80dffffe,d0
  32.         bne.s    mc2
  33.         rts
  34.  
  35. copper:        dc.w    $0100,$5200,$0102,$0000
  36.         dc.w    $008e,$2c81,$0090,$f4c1
  37.         dc.w    $0092,$0038,$0094,$00d0
  38. bpl:        dc.w    $00e0,$0000,$00e2,$0000
  39.         dc.w    $00e4,$0000,$00e6,$0000
  40.         dc.w    $00e8,$0000,$00ea,$0000
  41.         dc.w    $00ec,$0000,$00ee,$0000
  42.         dc.w    $00f0,$0000,$00f2,$0000    
  43. coppsprites:    dc.w    $0120,$0000,$0122,$0000
  44.         dc.w    $0124,$0000,$0126,$0000
  45.         dc.w    $0128,$0000,$012a,$0000
  46.         dc.w    $012c,$0000,$012e,$0000
  47.         dc.w    $0130,$0000,$0132,$0000
  48.         dc.w    $0134,$0000,$0136,$0000
  49.         dc.w    $0138,$0000,$013a,$0000
  50.         dc.w    $013c,$0000,$013e,$0000
  51.         dc.w    $01df,$fffe
  52. coppcolors:    dc.w    $0180,$0000,$0182,$0000
  53.         dc.w    $0184,$0000,$0186,$0000
  54.         dc.w    $0188,$0000,$018a,$0000
  55.         dc.w    $018c,$0000,$018e,$0000
  56.         dc.w    $0190,$0000,$0192,$0000
  57.         dc.w    $0194,$0000,$0196,$0000
  58.         dc.w    $0198,$0000,$019a,$0000
  59.         dc.w    $019c,$0000,$019e,$0000
  60.         dc.w    $01a0,$0000,$01a2,$0000
  61.         dc.w    $01a4,$0000,$01a6,$0000
  62.         dc.w    $01a8,$0000,$01aa,$0000
  63.         dc.w    $01ac,$0000,$01ae,$0000
  64.         dc.w    $01b0,$0000,$01b2,$0000
  65.         dc.w    $01b4,$0000,$01b6,$0000
  66.         dc.w    $01b8,$0000,$01ba,$0000
  67.         dc.w    $01bc,$0000,$01be,$0000
  68.         dc.l    $ffffffff
  69.